home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8028 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.3 KB  |  57 lines

  1. Path: news.cyberport.com!usenet
  2. From: tangent@cyberport.com (Warren Young)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Crappy or what? Oualline's C++ book
  5. Date: Sun, 18 Feb 1996 18:15:01 GMT
  6. Organization: none
  7. Message-ID: <312769c7.101309755@news.cyberport.com>
  8. References: <KRAWCHUK.96Feb15102809@survey.ensu.ucalgary.ca>
  9. NNTP-Posting-Host: ppp22.cyberport.com
  10. X-Newsreader: Forte Agent .99d/32.182
  11.  
  12. krawchuk@ensu.ucalgary.ca (Mike Krawchuk) wrote:
  13.  
  14. >An instructor in our department asked me to verify some suspicions he
  15. >had about a book he was considering using as a text - Practical C++
  16. >Programming, by Steve Oualline, published by O'Reilly & Associates Inc.
  17.  
  18. Report the problems to them.  ORA is very good about fixing errors in
  19. new printings -- they're more like software than books that way.  Just
  20. looking on the verso of _Using C on the UNIX System_ (the closest ORA
  21. book at hand) I see four printing updates for "minor corrections" even
  22. though the book is still technically a first edition.  _The Whole
  23. Internet User's Guide and Catalog_ had five printing updates before
  24. its second edition.
  25.  
  26. For what it's worth, the latest (?) C/C++ User's Journal reviewed that
  27. book and the other new ORA C++ book (C++: The Base Language?).  You
  28. might find the review useful as a second opinion.  I came away with a
  29. feeling that the books were useful.
  30.  
  31. >  const char *answer_ptr = "Forty-Two";
  32. >
  33. >  answer_ptr = "Fifty-One"; // Oualline says illegal; Stroustrup, gcc says OK
  34. >  *answer_ptr = 'X'; // Oualline says legal; Stroustrup, gcc says illegal
  35.  
  36. This would be a simple error to correct, and it's obviously just a
  37. slip of habit.  The correct version isn't often seen or used, in my
  38. experience:
  39.  
  40. char* const answer_ptr = "Forty-Two";
  41.  
  42. I showed that to two C coders at my workplace recently, and it
  43. surprised them because they didn't even know you could do that.  They
  44. didn't even think it would compile until it did.
  45.  
  46. >The O'Reilly web site doesn't have errata for the book, but I can't
  47.  
  48. The books are just a few months old.  Give them some time to improve,
  49. to "age".  I can think of many first editions that have sucked where
  50. their second editions (or updated printings in ORA's case) have been
  51. invaluable.
  52.  
  53. (No, I don't work for O'Reilly.  I just have a dozen or so of their
  54. books and haven't regretted purchasing any of them in the slightest.)
  55.  
  56. = Warren --
  57.